package chai.ning.encapsulation;

import java.util.Arrays;

public class Human {
	
	private char[] name ;
	private int age ;
	private char gender ;
	private boolean married ;
	
	public void assign( String name , int age , char gender , boolean married ) {
		this.name = name.toCharArray(); 
		this.age = age ;
		this.gender = gender ;
		this.married = married ;
	}
	
	public void introduce() {
		System.out.println( Arrays.toString( this.name ) + " , " + this.gender + " , " + this.age + " , " + this.married );
	}
	
	public static void main(String[] args) {
		
		Human h = new Human();
		/*
		h.name = "谢逊" ;
		h.age = 50 ;
		h.gender = '男' ;
		h.married = true ;
		*/
		
		h.assign( "谢逊" , 50 , '男',  true );
		
		h.introduce();
		
	}

}
